package icu.groot.alan.hotel.controller.hotel;

import icu.groot.alan.hotel.entity.dao.HotelDo;
import icu.groot.alan.hotel.service.HotelService;
import icu.groot.alan.hotel.util.response.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * Hotel Management
 */
@RestController
@RequestMapping("/hotel")
public class HotelController {
    @Resource
    HotelService hotelService;

    @ApiOperation("Get Hotel Info")
    @GetMapping("/info")
    public Result<HotelDo> info(){
        return Result.success(hotelService.list().get(0));
    }
}
